/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import Entity.Etbl_Users;
import Model.DALtbl_Users;

/**
 *
 * @author mrteo
 */
public class Btbl_Users {
    private DALtbl_Users _objDALtbl_Users = null;
    
    public Btbl_Users(){
        _objDALtbl_Users = new DALtbl_Users();
    }
    
    public boolean addtbl_Users(Etbl_Users objtbl_Users){
        return _objDALtbl_Users.addtbl_Users(objtbl_Users);
    }
    
    public boolean edittbl_Users(Etbl_Users objtbl_Users){
        return _objDALtbl_Users.edittbl_Users(objtbl_Users);
    }
    
    public boolean deletetbl_Users(int userId){
        if(userId >0){
            return _objDALtbl_Users.deletetbl_Users(userId);
        }else {
            return false;
        }
    }
    public Etbl_Users CheckLogin(String UserName,String PassWord){
        if(!(UserName.equals("") & PassWord.equals("")))
            if(UserName.length()<6 | PassWord.length()<6)
                return _objDALtbl_Users.CheckLogin(UserName, PassWord);
            else
                return null;
        else
            return null;
    }
    public static void main(String[] args){
        Btbl_Users oUser = new Btbl_Users();
        Etbl_Users euser= oUser.CheckLogin("test","123456");
        System.out.println(euser.getFullName());
    }
}
